package com.cloud.punish.tasklist.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import com.cloud.punish.common.driver.SimpleInlangDriver;
import com.cloud.punish.common.utils.BaseMapperHelper;
import com.cloud.punish.tasklist.entity.TaskListMenuPart;

public interface TaskListMenuPartMapper extends BaseMapperHelper<TaskListMenuPart> {

	@Select("select menu_id from task_list_menu_part t1 where t1.task_list_id = #{taskListId} and t1.part_id in (#{parts}) and t1.auth_code = 1 and exists (select * from task_list_menu t2 where t2.menu_act_independ = 0 and t1.menu_id = t2.menu_id)")
	@Lang(SimpleInlangDriver.class)
	@ResultType(Long.class)
	List<Long> loadUnActMenu(@Param("taskListId")long taskListId, @Param("parts")List<Long> parts);
}
